/*
 * Copyright Notice ====================================================
 * This file contains proprietary information of JeeStrap Co.
 * Copying or reproduction without prior written approval is prohibited.
 * Copyright (c) 2014 All rights reserved. =============================
 */

package com.jeestrap.common.smartcoder;

import java.awt.EventQueue;
import java.awt.Font;
import java.util.Enumeration;

import javax.swing.UIManager;
import javax.swing.plaf.FontUIResource;

import com.jeestrap.common.smartcoder.gui.setting.SettingFrame;

/**
 * Description goes here.
 * 
 * @since
 */
public class SmartCoder {

	/**
	 * Description goes here.
	 * 
	 * @param args
	 * 
	 * @since
	 */
	public static void main(String[] args) {
		System.out.println("JeeWeb - 代码生成器   START");
		setUIDefaultFont();
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
					SettingFrame frame = new SettingFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					System.out.println("JeeWeb - 代码生成器   Error END. Exception:" + e.getMessage());
				}
			}
		});
	}
	
	static void setUIDefaultFont(){
		Font localFont = new Font("Dialog", 0, 14);
		FontUIResource localFontUIResource = new FontUIResource(localFont);
		Enumeration localEnumeration = UIManager.getDefaults().keys();
		while (localEnumeration.hasMoreElements()) {
			Object localObject1 = localEnumeration.nextElement();
			Object localObject2 = UIManager.get(localObject1);
			if ((localObject2 instanceof FontUIResource))
				UIManager.put(localObject1, localFontUIResource);
		}
	}
}
